package patternmining.model.construction;

/**
 * @version 1.0, 11.07.2008
 * @author Holger Wiehen
 */
public class UnknownMethodException extends Exception{
    private String methodName;
    private String[] parameterTypes;
    
    public UnknownMethodException(){
        super();
    }
    
    public UnknownMethodException(String methodName, String[] parameterTypes){
        this();
        this.methodName = methodName;
        this.parameterTypes = parameterTypes;
    }
    
    public String toString(){
        String text = "patternmining.model.construction.UnknownMethodException";
        text = text + " for method: name -> " + methodName + " parameterTypes -> ";
        if( parameterTypes != null ){
            for ( String type : parameterTypes ){
                text = text + ", " +type;
            }
            if( parameterTypes.length == 0){
                text = text + "void";
            }   
        }
        else {
            text = text + "null";
        }
        return text;
    }
}
